package com.zzc.hankz.session.defaults;

import com.zzc.hankz.session.Configuration;
import com.zzc.hankz.session.SqlSession;
import com.zzc.hankz.session.SqlSessionFactory;

/**
 * DefaultSqlSessionFactory
 * @author：zzc
 * @date: 2022/4/10
 */
public class DefaultSqlSessionFactory implements SqlSessionFactory {

    private final Configuration configuration;

    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }

    @Override
    public SqlSession openSession() {
        return new DefaultSqlSession(configuration);
    }

}
